<html><head><title>Count the most represented clones</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>topClones(LGS)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   topClones">
<param name="keyword" value=" Count the most represented clones">
</object>


<h2>Count the most represented clones</h2>


<h3>Description</h3>

<p>
<code>topClones</code> takes a vector of haplotype counts and returns the minimum number of haplotypes (clones) that account for a given percentage of the whole population. It is useful to have an idea of how diverse a population is.
</p>


<h3>Usage</h3>

<pre>
topClones(x = NULL, np = c(0.68, 0.95, 0.99))
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
A vector of haplotype counts. It could be the output of <code>selClones</code>. </td></tr>
<tr valign="top"><td><code>np</code></td>
<td>
Vector of percentages. <code>topClones</code> will return the minimal number of clones to reach these proportions (i.e. the most represented haplotypes). </td></tr>
</table>

<h3>Value</h3>

<p>
A vector of number of haplotypes necessary to make the proportions specified in <code>np</code> (also printed on standard output).</p>

<h3>Author(s)</h3>

<p>
Dario Beraldi dario.beraldi@ed.ac.uk
</p>


<h3>Examples</h3>

<pre>
# A population where few clones account for a large proportion of total individuals
set.seed(1234)
xv&lt;- round(c(runif(n= 100, min=1, max=10), runif(n= 10, min= 2000, max= 10000))) # Each value is a count of different haplotypes
xy&lt;- topClones(xv) # The six most represented haplotypes make 68
</pre>



<hr><div align="center">[Package <em>LGS</em> version 1.0 <a href="00Index.html">Index]</a></div>

</body></html>
